package com.xhu.water_supply.service.impl;

import com.xhu.water_supply.entity.Worker;
import com.xhu.water_supply.mapper.WorkerMapper;
import com.xhu.water_supply.service.WorkerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WorkerServiceImpl implements WorkerService {

    @Autowired
    private WorkerMapper workerMapper;

    public Boolean add(Worker worker){return workerMapper.add(worker);}

    public Boolean del(int id){return workerMapper.del(id);}

    public Boolean edit(Worker worker){return workerMapper.edit(worker);}

    public List<Worker> findAll(){return workerMapper.findAll();}

    public Worker findOne(int id){return workerMapper.findOne(id);}

    public List<Worker> findName(String name){return workerMapper.findName(name);}


}
